/**   
 * @Title: LoginAction.java   
 * @Package edu.adweb.ssh   
 * @Description: TODO(用一句话描述该文件做什么)
 * Copyright: Copyright (c)  2011  
 * Company: Fudan   
 * @author FangYong   
 * @date 2011 2011-3-30 下午08:56:55   
 *@version 1.0   
 */    
package edu.adweb.ssh;

import edu.adweb.ssh.service.UserService;

/**
 * @ClassName: LoginAction   
 * @Description: TODO(这里用一句话描述这个类的作用)   
 * @author FangYong   
 * @date 2011-3-30 下午08:56:55   
 */
public class LoginAction {
	
	public String username;
	public String password;
	
	public UserService us;
	
	
	
	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}



	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}



	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}



	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}



	/**
	 * @return the us
	 */
	public UserService getUs() {
		return us;
	}



	/**
	 * @param us the us to set
	 */
	public void setUs(UserService us) {
		this.us = us;
	}



	public String execute()
	{
		if(us.validate(username, password))
			return "success";
		return "error";
	}
}
